#ifndef _FRAMEBUFFER_H
#define _FRAMEBUFFER_H

#include "global.h"

#ifdef __cplusplus
extern "C" {
#endif

enum FrameBuffer_Type
{
	def_DataType_YUV420P	= 0,
	def_DataType_YUV420SP	= 1,
	def_DataType_YV12		= 2,
	def_DataType_RGB565		= 7,
	def_DataType_RGB8888	= 9,
	def_DataType_YUV422SP	= 16,
	def_DataType_STREAM		= 64,
	def_DataType_SURFACE	= 100,
};

typedef struct _FrameBuffer {
	void* mpData;
	size_t mSize;

	int mAngle;
	int mType;
	bool mfMirror;
} FrameBuffer;

size_t size(FrameBuffer *fb);
int getDisplayAngle(FrameBuffer *fb);
void setDisplayAngle(FrameBuffer *fb, int angle, bool mirror);
void setBufferType(FrameBuffer *fb, int t);
int getBufferType(FrameBuffer *fb);
bool isMirror(FrameBuffer *fb);

#ifdef __cplusplus
}
#endif
#endif
